// 调用合约
// 导入合约实例
let instance = require('./instance');
const from = '0x43B05ee522bDBcb6c0bC0174C6439D257Af1D86f';

let test = async () => {
    try {
        let v1 = await instance.methods.getValue().call();
        console.log('v1:',v1);

        let res = await  instance.methods.setValue('hello Guan').send({
            from:from,
            value:0,
        });
        console.log('res:',res);

        let v2 = await instance.methods.getValue().call();
        console.log('v2:',v2);
    } catch (e) {
        console.log(e);
    }
};

test();